local sk__zhishic = fk.CreateSkill {

  name = "sk__zhishic",

  tags = {  },

}



sk__zhishic:addEffect("active", {
  name = "sk__zhishic",
  anim_type = "control",
  card_num = 0,
  target_num = 1,
  prompt = "#sk__zhishic",
  can_use = function(self, player)
    return player:usedSkillTimes(sk__zhishic.name, Player.HistoryPhase) == 0
  end,
  card_filter = Util.FalseFunc,
  target_filter =function (self, player, to_select, selected, selected_cards)
    return #selected == 0
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local target = effect.tos[1]
    local cards = room:askForDiscard(target, 1, 1, false, sk__zhishic.name, true,
      ".|.|.|.|.|basic", "#sk__zhishic-discard::"..player.id, true)
    if #cards > 0 then
      room:throwCard(cards, sk__zhishic.name, target, target)
    else
      room:damage({
        from = player,
        to = target,
        damage = 1,
        skillName = sk__zhishic.name,
      })
    end
    if not target.dead and target:isWounded() then
      room:recover({
        who = target,
        num = 1,
        recoverBy = player,
        skillName = sk__zhishic.name,
      })
    end
  end,
})

return sk__zhishic